﻿using Chat.Common;
using System.Text;

public class Message
{
    /// <summary>
    /// 消息类型,群聊&私聊
    /// </summary>
    public ChatType ChatType { get; set; }
    /// <summary>
    /// 消息的发送者信息
    /// </summary>
    public ChatObject Sender { get; set; }
    /// <summary>
    /// 消息接收者信息
    /// </summary>
    public ChatObject Receiver { get; set; }
    /// <summary>
    /// 
    /// 消息的内容
    /// </summary>
    public string Content { get; set; }

    public override string ToString()
    {
        StringBuilder sb = new StringBuilder();
        sb.Append(ChatType.ToString() + "\n");
        sb.Append(Sender.ToString() + "\n");
        sb.Append(Receiver.ToString() + "\n");
        sb.Append(Content + "\n");
        return sb.ToString();
    }
}

